home *** CD-ROM | disk | FTP | other *** search
- Date: Thu, 3 Mar 94 15:09:47 PST
- From: hyc@hanauma.jpl.nasa.gov (Howard Chu)
- Message-Id: <9403032309.AA20975@hanauma.jpl.nasa.gov>
- To: herborth@53iss6.waterloo.ncr.com, mint@atari.archive.umich.edu
- Subject: Re: Three things
-
- I've been tracking just about all the patches and RCSing them into my source
- tree. Right now I only have Julian's tosfs stuff and Steve's load-average
- stuff left to merge in. (And perhaps to back out entropy's last job control
- change?)
-
- [re: cross-compiler, sym-ld - you always need to use sym-ld if you plan to
- debug with gdb. Not just for little-endian systems...]
-
- I am unfortunately too busy trying to get other code to work at this moment to
- build a new gcc setup. I'm still running 2.3.3...
-
- btw, since I don't know of a program that directly takes diffs into an RCS
- control file, here are two csh scripts I've been using for a while to manage
- patches... The first, "patchit" runs patch and then checks the affected files
- into RCS. The second, "checkin" just looks for patched files and checks them
- in. I patched my copy of patch to name files ".O" and ".R" instead of ".orig"
- and ".rej" on the ST, since they have a better chance of staying intact on a
- short-name filesystem. [You've got to be using MinixFS to keep case preserved,
- eh?] The scripts work fine with tcsh on the ST, [originally used on a Sun...]
- though I source them in that case, dunno about actually trying to execute them.
-
- Too bad neither of these scripts checks for changed files in subdirectories.
-
- #!/bin/csh -f
- # Patchit - apply patches and check into RCS. -- hyc, 3-1-93
- if ($#argv < 1) then
- echo "usage: $argv[0] patchfile [patch-options]"
- exit 1
- endif
-
- set nonomatch
- if (-e *.orig) then
- echo "You still have to check in some old files\!"
- echo *.orig
- exit 1
- endif
-
- if (! -e RCS) then
- echo "Creating RCS directory in $cwd"
- mkdir RCS
- endif
-
- if (! -e Text) then
- echo "Enter one line message for RCS initial description:"
- set i=$<
- echo $i > Text
- endif
-
- echo -n "Enter one-line patch identifier: "
- set msg=$<
-
- if ($#argv == 1) then
- patch < $argv[1]
- else
- patch $argv[2-] < $argv[1]
- endif
-
- foreach i (*.orig)
- set j=$i:r
-
- if (! -e RCS/$j,v) then
- mv $j $j.new
- mv $i $j
- ci -tText $j
- rcs -l $j
- mv $j.new $j
- endif
-
- ci -l -m"$msg" $j
- if (-e $i) rm $i
- end
-
- if (-e *.rej) then
- unset nonomatch
- echo "Got some problems, check these out:"
- ls -l *.rej
- exit 1
- endif
- exit 0
-
- #!/bin/csh -f
- # checkin - check patched files into RCS. -- hyc, 9-12-93
-
- if (! -e RCS) then
- echo "Creating RCS directory in $cwd"
- mkdir RCS
- endif
-
- if (! -e Text) then
- echo "Enter one line message for RCS initial description:"
- set i=$<
- echo $i > Text
- endif
-
- echo -n "Enter one-line patch description: "
- set msg=$<
- foreach i (*.orig)
- set j=$i:r
-
- if (! -e RCS/$j,v) then
- mv $j $j.new
- mv $i $j
- ci -tText $j
- rcs -l $j
- mv $j.new $j
- endif
-
- ci -l -m"$msg" $j
- if (-e $i) rm $i
- end
-
-
- ####
-
- I suppose you might want to be more verbose than just the single-line messages
- I used. I just run it and say, for initial description, e.g., "mint source"
- and e.g. "Optimizations from Andreas Schwab" and in it goes... (Mebbe it would
- be a good idea to also assign symbolic names to a set of patched files?)
- Enjoy...
-